package com.example.graphicslib.test;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.Menu;
import android.view.View;
import android.widget.Button;

import com.example.graphicslib.R;

public class MainActivity extends Activity {


    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        movementAnim = (Button)findViewById(R.id.anim_movement);
        frameAnim = (Button)findViewById(R.id.anim_frame);
        rotationAnim = (Button)findViewById(R.id.anim_rotation);
        moveAndFrameAnim = (Button)findViewById(R.id.anim_moveframe);
        rotateAndFrameAnim = (Button)findViewById(R.id.anim_rotateframe);
        moveAndRotateAnim = (Button)findViewById(R.id.anim_rotatemove);

        movementAnim.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent intent = new Intent(MainActivity.this, MovementAnimationOptionsActivity.class);
                //intent.putExtra(TYPE, VELOCITY);
                startActivity(intent);
            }
        });

        frameAnim.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent intent = new Intent(MainActivity.this, FrameAnimationExampleActivity.class);
               // intent.putExtra(TYPE, ACCELERATION);
                startActivity(intent);
            }
        });

        rotationAnim.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent intent = new Intent(MainActivity.this, RotationAnimationExampleActivity.class);
                //intent.putExtra(TYPE, COORDS);
                startActivity(intent);
            }
        });

        moveAndFrameAnim.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                startActivity(new Intent(MainActivity.this, MovementFrameAnimationExampleActivity.class));
            }
        });

        rotateAndFrameAnim.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                startActivity(new Intent(MainActivity.this, RotationFrameAnimationExampleActivity.class));
            }
        });

        moveAndRotateAnim.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                startActivity(new Intent(MainActivity.this, MovementRotationAnimationExampleActivity.class));
            }
        });
    }


    @Override
    public boolean onCreateOptionsMenu(Menu menu) {
        
        // Inflate the menu; this adds items to the action bar if it is present.
        getMenuInflater().inflate(R.menu.main, menu);
        return true;
    }

    Button movementAnim, frameAnim, rotationAnim, moveAndFrameAnim, rotateAndFrameAnim, moveAndRotateAnim;
}
